<?php
/*
 * Tin tìm việc
 */
?>
<style>

    .form-horizontal .control-label {
        float: left;
        font-size: 12px;
        margin-right: 9px;
        padding-top: 5px;
        text-align: right;
        width: 150px;
    }
    label{font-weight:bold;}
    .btn-add-nn {
        margin-top: 11px;
        float: left;
        margin-left: 5px;
    }
    .sub-nn {
        margin-left: 172px;
    }
    .sel {
        background: whitesmoke;
    }
    .ar{text-align: right;}
    .nn-row span {
        float: left;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 5px;
    }
    .mt_20 {
        float: left;
        margin-top: 10px;
    }
    .mt_10 {
        float: left;
        margin-top: -9px;
    }
    .mt_5 {
        margin-top: 9px!important;
        float: left;
        margin-left: -19px;
        cursor: pointer;
    }
    
    .control-label {
        clear: both;
    }
    .radio label {
        font-size: 12px;
    }
    .form-horizontal .control-label {
    float: left;
    font-size: 12px;
    margin-right: 9px;
    padding-top: 5px;
    text-align: right;
    width: 164px;
}
.row-fluid .span3 {
    width: 18.404%;
}

.row-fluid .span9 {
    margin-left: 26px;
    width: 74.4681%;
}
</style>
<div class="row">
    <div class="span3">        
        <?php $this->widget('quanlynghenghiepungvien'); ?>
        <?php $this->widget('mucdohoanthanhhoso'); ?>
    </div>
    <div class="span9_5">
        <!-- tin tim viec -->
        <div class="jb_left2">
            <p class="job_title_common">
                <strong><span class='span9'><i class='icon-folder-open icon-white'></i> Tạo hồ sơ tìm việc : chi tiết hồ sơ </span></strong>
            </p>
            <div class="cont_jb_left_span9_5">
                <!-- thong tin nghe nghiep -->
                
                <?php $this->renderPartial('_thongtinnghenghiep',array(
                        'model'                 => $thongtinnghenghiep,
                        'hoso_nganhnghe'        => $hoso_nganhnghe,
                        'hoso_trinhdongoaingu'  => $hoso_trinhdongoaingu,
                        'hoso_hinhthuc'         => $hoso_hinhthuc,
                        'hoso_loaihinh'         => $hoso_loaihinh,
                        'hoso_luong'            => $hoso_luong,
                        'hoso_thanhpho'         => $hoso_thanhpho,
                        'hoso_quocgia'          => $hoso_quocgia,
                        'hid'                   => $hid
                )); ?>
                <?php if($is_update == 'ok'){  ?>
                <!-- qua trinh hoc van -->   
                
                <?php $this->renderPartial('_quatrinhhoc',array(
                        'model'=> $quatrinhhoc,
                        'hid'  => $hid
                )); ?>
                
                <!-- qua kinh nghiệm làm việc -->   
                
                <?php $this->renderPartial('_kinhnghiemlamviec',array(
                        'model'=> $hoso_kinhnghiemlamviec,
                        'hid'  => $hid
                )); ?>
                
                <!-- ky nang chuyen mon -->      
                
                <?php $this->renderPartial('_kynangchuyenmon',array(
                        'model'         => $kynangchuyenmon,
                        'hoso_kynang'   => $hoso_kynang,
                        'hid'           => $hid
                )); ?>
                
                <!-- thong tin bo sung -->
                <?php $this->renderPartial('_thongtinbosung',array(
                    'model' => $hoso,
                    'hid'   => $hid
                   ));
                ?>
                
                <!-- nguoi tham khao -->
                <?php $this->renderPartial('_nguoithamkhao',array(
                        'model'=> $nguoithamkhao,
                        'hid'  => $hid,
                        'tid'  => $tid
                )); ?>
            </div>
            </div>
        <div class='clearfix' ></div>
                <div class='row-fluid'>
                    <div class='span12 offset3'>
                        <a class='btn btn-large btn-success' href='<?php echo Yii::app()->getBaseUrl(true); ?>/ungvien/chitiet.html?id=<?php echo $hid; ?>'><i class='icon-check icon-white'></i> XEM & HOÀN TẤT HỒ SƠ</a>
                    </div>
                </div><br />
                <?php }else{ ?>
                    <legend class="title-field title-jobs mt_20"><i class="icon icon-plus-sign mt_5 icon-white"></i> Quá trình học vấn</legend>
                    <legend class="title-field title-jobs mt_20"><i class="icon icon-plus-sign mt_5 icon-white"></i> Kinh nghiệm làm việc</legend>
                    <legend class="title-field title-jobs mt_20" id="step4"><i class="icon icon-plus-sign mt_5 icon-white"></i> Kỹ năng chuyên môn</legend>
                    <legend class="title-field title-jobs mt_20" id="step5"><i class="icon icon-plus-sign mt_5 icon-white"></i> Thông tin bổ sung</legend>
                    <legend class="title-field title-jobs mt_20" id="step6"><i class="icon icon-plus-sign mt_5 icon-white"></i> Người tham khảo</legend>
                    </div>
        </div>
        <div class='clearfix' ></div>
                <?php } ?>
            
        <!-- tin tìm việc -->
    </div>
</div>
<script>
    $(document).ready(function(){
        
        //check limits
        var tp = 1;
        var qg = 1;
        
        
        /* muc tieu nghe nghiep */
        $('#ThongTinNgheNghiepForm_muctieunghenghiep').keyup(function(){
            var mt = $(this).val();
            if(mt.length > 4000){
                alert('Nhập không quá 4000 từ');
                var a = mt.substr(0,4000);
                $('#kt').val(a);
                return false;
            }else{
                $('#kt').val(4000-mt.length);
            }
                
        });
        
        /* thong tin bo sung */
        $('#ttbs').keyup(function(){
            var mts = $(this).val();
            if(mts.length > 2000){
                alert('Nhập không quá 2000 từ');
                var a = mts.substr(0,2000);
                $('#kts').val(a);
                return false;
            }else{
                $('#kts').val(2000-mts.length);
            }
                
        });
        
        
        /* luong */
        $('#ThongTinNgheNghiepForm_luongdenghi_luong').change(function(e){
            var val = $(this).val();
            if(val == 3 || val == 4){
                $('.sa').removeAttr('disabled');
            }else{
                $('.sa').attr('disabled','disabled');
            }
        });
        
    
        //clear
        console.clear();
    });
</script>